package com.csk.zsk.compents.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csk.zsk.compents.dao.MusicWeeklyDao;
import com.csk.zsk.compents.entity.MusicWeekly;

@Service
@Transactional
public class MusicWeeklyServiceImpl implements MusicWeeklyService {

	@Autowired
	private MusicWeeklyDao musicWeeklyDao;

	@Override
	public void saveMusicWeekly(MusicWeekly musicWeekly) {
		musicWeeklyDao.save(musicWeekly);

	}

	@Override
	@Transactional(readOnly = true)
	public MusicWeekly getMusicWeeklyById(String id) {
		return musicWeeklyDao.getIdByGetMethod(id);
	}

	@Override
	@Transactional(readOnly = true)
	public List<MusicWeekly> getMusicWeeklyByNum(Integer num) {
		return musicWeeklyDao.getMusicWeeklyByNum(num);
	}

}
